package com.hctforgreen.greenservice.utils;

import android.app.Activity;
import android.util.DisplayMetrics;

public class ScreenUtil {

	public int getScreenWidth(Activity activity) {
		DisplayMetrics dm = new DisplayMetrics();
		activity.getWindowManager().getDefaultDisplay().getMetrics(dm);
		int screenWidth = dm.widthPixels;
		return screenWidth;
	}
	public int getScreenHeight(Activity activity) {
		DisplayMetrics dm = new DisplayMetrics();
		activity.getWindowManager().getDefaultDisplay().getMetrics(dm);
		int screenHeight = dm.heightPixels;
		return screenHeight;
	}
	public boolean bLongScreen(Activity activity){
		DisplayMetrics dm = new DisplayMetrics();
		activity.getWindowManager().getDefaultDisplay().getMetrics(dm);
		int screenWidth = dm.widthPixels;
		int screenHeight = dm.heightPixels;
		
		float scale = screenHeight / (float)screenWidth;
		if(scale >= 1.6f){
			return true;
		}else{
			return false;
		}

		
	}
}
